//
//  Line_downMangeViewController.m
//  DA_V
//
//  Created by 中亿世联前台 on 15/4/28.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "Line_downMangeViewController.h"
#import "LineListTableViewCell.h"
#import "UIViewAdditions.h"
#import "InterFace.h"

@interface Line_downMangeViewController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation Line_downMangeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self createSubView];
}


#pragma -mark 创建SubViews
- (void)createSubView{
    
    //我的上线
    UILabel *myUpLine = [[UILabel alloc] initWithFrame:CGRectMake(10, 74, 200, 30)];
    myUpLine.text = @"我的上线:张三";
     [self.view addSubview:myUpLine];
    
    //等级
    UILabel *rank = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 100-10, 74, 100, 30)];
    rank.text = @"等级：1";
     [self.view addSubview:rank];
    
    //全部下线
    UILabel *allUpLine = [[UILabel alloc] initWithFrame:CGRectMake(myUpLine.frame.origin.x, myUpLine.bottom, 100, 30)];
    allUpLine.text = @"全部下线";
    [self.view addSubview:allUpLine];
    
    //列表Title
    UIView *titleView = [[[NSBundle mainBundle] loadNibNamed:@"GeRen_xibs" owner:self options:nil] objectAtIndex:4];
    titleView.frame = CGRectMake(20, allUpLine.bottom, SCREEN_WIDTH-40, 40);
    [self.view addSubview:titleView];
    
    UITableView *lientableView = [[UITableView alloc] initWithFrame:CGRectMake(20, titleView.bottom, SCREEN_WIDTH-40, 280)];
    lientableView.dataSource = self;
    lientableView.delegate = self;
//    lientableView.backgroundColor = [UIColor magentaColor];
    [self.view addSubview:lientableView];
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 46;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 6;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *indertStr = @"lineLisetCell";
    LineListTableViewCell *lineLisetCell = [tableView dequeueReusableCellWithIdentifier:indertStr];
    if (lineLisetCell == nil) {
        lineLisetCell = [[[NSBundle mainBundle] loadNibNamed:@"GeRen_xibs" owner:self options:nil] objectAtIndex:5];
    }
    return lineLisetCell;
}
@end
